package com.whfp.afs330h_sdk.presenter;


import com.whfp.afs330h_sdk.model.BaseModel;
import com.whfp.afs330h_sdk.view.BaseView;

public abstract class BasePresenter<V extends BaseView, M extends BaseModel> {

    protected V view;
    protected M model;

    public BasePresenter() {
        model = createModel();
    }

    void attachView(V view) {
        this.view = view;
    }

    void detachView() {
        this.view = null;
    }

    abstract M createModel();
}
